/*
* @Author: chenggh
* @Date: 2025-06-21
* @Link to Problem : https://webvpn.neu.edu.cn/https/62304135386136393339346365373340bfebea318fd008d8f60d257088/courses/27/part/223/problem/1009
*/
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
	int n, x;
	cin >> n >> x;
	vector<int> v(n);
	for(int i = 0; i < n; i++){
		cin >> v[i];
	}
	sort(v.begin(), v.end());
	int l1 = 0, l2 = v.size() - 1;
	int cnt = 0;
	while(l1 < l2){
		if(v[l1] + v[l2] > x) l2--;
		else l2--, l1++;
		cnt++;
	}
	if(l1 == l2) cnt++;
	cout << cnt << endl;
	return 0;
}